<%@ page contentType="text/html; charset=UTF-8" %>
<!-- kfc add 170606 start-->
<%String path = request.getContextPath() ;%>
<script src="<%=path %>/resource/constant/AssConstant.js" type="text/javascript"></script>
<!-- kfc add 170606 end-->
<script type="text/javascript">
	//格式化时间：YYYY.MM.DD
	function renderDate(dateStr1){
		var dateStr2 = "";
		if(null != dateStr1){
			var date = new Date(dateStr1);
			dateStr2 = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
			dateStr2 = dateStr2.replace(/\-/g, ".");//把YYYY-MM-DD替换成YYYY.MM.DD
		}
		return dateStr2;
	}
	
	//格式化时间1：YYYY-MM-DD
	function renderDate1(dateStr1){
		var dateStr2 = "";
		if(null != dateStr1){
			var date = new Date(dateStr1);
			dateStr2 = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
		}
		return dateStr2;
	}
	
	//格式化时间2：YYYY-MM-DD
	function renderDate2(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
		}
		return dateStr;
	}
	
	//格式化时间3：YYYY_MM_DDHHMMSS
	function renderDate3(dateStr1){
		var dateStr2 = "";
		if(null != dateStr1){
			var date = new Date(dateStr1);
			dateStr2 = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr2;
	}
	
	//判断是否为数字
	function isNumber(value) {
		var m = /^(\d)+$/;
		value = value.replace(/,/g, '');
		if(value.match(m) && new Number(value) >= 0) {
			return true;
		}else {
			return false;
		}
	}
	
	//判断是否为double型数值
	function isDouble(value) {
		value = value + "";
		var m = /^(\d)+(.){1}(\d)+$/;
		value = value.replace(/,/g, '');
		if(new Number(value) >= 0 && (value.match(m) || valueIsNumber(value))) {
			return true;
		}else {
			return false;
		}
	}
	
	//验证数字,截取N位小数-参数为String
	function anyString2(str,n){
		str=str+"";
		str=str.replace(/\.{2,100}|[a-zA-Z]{1,100}|[\u4e00-\u9fa5]{1,100}|[\+\_\=\!\@\#\$\%\^\&\*\(\)\"\'\?\/\>\<\,\s]{1,100}/,"");
		if(n==null||n.length==0||n==undefined){
			n=2;
		}
		if(str.indexOf('.')!=-1){
			str=str.substring(0,str.indexOf('.')+n+1);
		}
		return str;
	}
	
	//验证数字,保留N位小数-参数为String
	function anyString(str,n){
		str=str+"";
		str=str.replace(/\.{2,100}|[a-zA-Z]{1,100}|[\u4e00-\u9fa5]{1,100}|[\+\_\=\!\@\#\$\%\^\&\*\(\)\"\'\?\/\>\<\,\s]{1,100}/,"");
		if(n==null||n.length==0||n==undefined){
			n=2;
		}
		var num = new Number(str);
		return num.toFixed(n);
	}
</script>

<style type="text/css">
	a:link{text-decoration: none; color:blue; font-family: 微软雅黑;}
	a:visited{color:green;}
	a:hover{text-decoration: underline; color:#09f;}
	a:active{text-decoration: blink; color: yellow;}
	.disp_right{
		float:right;
		margin-top:15px;
		margin-right:40px;
	}
	.disp_marg{
		margin-right:25px;
	}
</style>